# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=difftastic
pkgver=0.31.0
pkgrel=0
pkgdesc="Diff tool that understands syntax"
url="https://difftastic.wilfred.me.uk/"
license="MIT"
arch="all !s390x !riscv64" # blocked by rust/cargo
arch="$arch !aarch64 !armhf !armv7" # FTBFS on arm
makedepends="cargo openssl-dev"
source="https://github.com/Wilfred/difftastic/archive/$pkgver/difftastic-$pkgver.tar.gz"

prepare() {
	default_prepare
	cargo fetch --locked
}

build() {
	cargo build --frozen --release
}

check() {
	cargo test --frozen
}

package() {
	install -Dm755 target/release/difft -t "$pkgdir"/usr/bin
}

sha512sums="
2a1c5b953a4fdb5a43baf138528eab1cb5d38b140a6d99b814bba52c20079a6b790af9f4becab10b0687aed7fc1de89c8df570ad9d7116cec76fc004087d4763  difftastic-0.31.0.tar.gz
"
